{% extends "layout.html" %}

{% block title %}Création achat mobile {% endblock %}

{% block content %}
<script type="text/javascript"> if (window.jQuery == undefined) document.write( unescape('%3Cscript src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"%3E%3C/script%3E') );</script>
<script>
$(function() {
	$('#type').bind('change', function(ev) {
		
		var value = $(this).val();
		
		$.ajax({
		type: "GET",
		url: "liste-pays-ajax",
		data: "type="+value,
		error:function(msg){
		 alert( "Error !: " + msg );
		},
		success:function(data){
			//affiche le contenu du fichier dans le conteneur dédié
			$('#contenu_pays_ajax').html(data);}
	 	});
 	});
});
</script>
<form method="post" class="form-horizontal" >

	<div class="row">
	<div class="span11">
	<a href="pays_international_fixe_mobile" class="btn btn btn-primary"><i class="icon-plus-sign icon-white"></i> Voir la liste </a>
	  <fieldset>
		<legend align="center">Nouvel Offre Liste pays</legend>
    
    </fieldset>
    </div>
	 <!-- Première colonne -->
	<div class="span5">
    
	  <fieldset>
		
	<div class="control-group">
			<label class="control-label" for="type">Type</label>
			<div class="controls">
			   <select name="type" id="type" size="1" />
	           	<option value="">Selectionnez...</option>
				   	{% if not(session.niveauAuth=='2')and not(session.niveauAuth=='4')and not(session.niveauAuth=='6')and not(session.niveauAuth=='7')and not(session.niveauAuth=='9') %}
				  <option value="vga" {% if offre.type == "vga" %}selected{% endif %}>VGA</option>
				   <option value="vga-num" {% if offre.type == "vga-num" %}selected{% endif %}>VGA numeris</option>
				   {% endif %}
				   {% if not(session.niveauAuth=='2')and not(session.niveauAuth=='3')and not(session.niveauAuth=='4')and not(session.niveauAuth=='5')and not(session.niveauAuth=='6')and not(session.niveauAuth=='7')and not(session.niveauAuth=='8')and not(session.niveauAuth=='9') %}
				  <option value="voip" {% if offre.type == "voip" %}selected{% endif %}>VOIP</option>
				  <option value="mobile" {% if offre.type == "mobile" %}selected{% endif %}>Mobile</option>
				  {% endif %}
	              <option value=""> </option>
	
				</select>
			</div>
		  </div>
	
      <div class="control-group">
		<label class="control-label" for="code_artice">Code article</label>
        <div class="controls">
		<div class="input-prepend">
		   <input name="code_article" type="text" value=""/> 
		</div>
	  </div>
	  </div>
      
	  <div class="control-group">
		<label class="control-label" for="nom">Nom </label>
        <div class="controls">
		<div class="input-prepend">
		   <input name="nom" type="text" value=""/> 
		</div>
	  </div>
	  </div>
      
      	<div id="contenu_pays_ajax">
		</div>

	</fieldset>

	</div>
	</div>
	
		<div class="form-actions">
		<span>Action après validation</span>
		<br/>
		  <select name="action">
			<option value="pays_international_fixe_mobile">Afficher la liste </option>
			<!--<option value="">Créer une commande pour un client</a></option>-->
			<option value="pays_international_fixe_mobile-creation">Saisir une nouvelle offre</option>
		  </select>
		<br/><br/>
         
		<button type="submit" class="btn btn-primary" name="creation">Création</button>
        <button type="reset" class="btn " name="annuler">Annuler</button>
        
		</div>

	
</form>

{% endblock %}
	
